using System.ComponentModel;
using System.Windows;

namespace WIAssistant
{

    public delegate void StringPairValueChanged(string Key);
    public class StringPair: INotifyPropertyChanged
    {
        public string Key { get; set; }

        public event StringPairValueChanged OnValueChanged;

        public string Value
        {
            get { return _value; }
            set
            {
                _value = value;
                OnPropertyChanged("Value");
                if (OnValueChanged != null)
                    OnValueChanged(Key);
            }
        }
        private string _value;

        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}